//
//  ILFashionDetailBasonModel.m
//  ILife
//
//  Created by lanou on 15/10/26.
//  Copyright © 2015年 ILife. All rights reserved.
//

#import "ILFashionDetailBasonModel.h"

@implementation ILFashionDetailBasonModel


-(instancetype)init
{
    self = [super init];
    if (self) {
        _recommendArray = [NSMutableArray arrayWithCapacity:0];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}


-(void)setValue:(id)value forKey:(NSString *)key
{
    
    if ([key isEqualToString:@"description"])
    {
        self.desc = [NSString stringWithFormat:@"%@",value];
    }
    else if ([key isEqualToString:@"last"])
    {
        self.lastModel = [[ILFLastModel alloc]init];
        [self.lastModel setValuesForKeysWithDictionary:value];
    }
    else if ([key isEqualToString:@"next"])
    {
        self.nextModel = [[ILFNextModel alloc]init];
        [self.nextModel setValuesForKeysWithDictionary:value];
    }
    else if ([key isEqualToString:@"recommend"])
    {
        for (NSDictionary *dic in value) {
            self.recommendModel = [[ILFashionRecommendModel alloc]init];
            [self.recommendModel setValuesForKeysWithDictionary:dic];
            [self.recommendArray addObject:self.recommendModel];
        }
        
    }
    else
    {
        [super setValue:value forKey:key];
    }
    
}


@end
